import styles from './index.module.scss'
import Types from 'prop-types'
import Icon from '../Icon'

// 导航栏组件
// children用来获取组件标签中间的文字
const NavBar = ({onClick,children,rightContent}) => {
  return (
    <div className={styles.root}>
      <span className='navbar-left' onClick={onClick}>
        <Icon type='iconfanhui'/>
      </span>
      <div className='navbar-center'>{children}</div>
      <span className='navbar-right'>{rightContent}</span>
    </div>
  )
}
NavBar.propTypes = {
  onClick: Types.func,
  children:Types.node,
  rightContent: Types.node
}
export default NavBar
